<?php

`net start mysql`;
`git config --global user.name "张鹏"`;
`git config --global user.email "2890815226@qq.com`;
$db=new PDO("mysql:host=localhost", 'root', '12qwas');
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC);
$db->exec('create database if not exists db2');
$db->exec('use db2');
$db->exec("create table if not exists students (xh varchar(9) not null primary key,name varchar(50), tel varchar(11),pwd varchar(20) default '12345', isAdmin tinyint(1) default  0");
$r=$db->exec('delete from students');
echo "删除记录个数：{$r}条\n";
$r=$db->exec("insert into students(xh,name,tel) values
         ('213110601','张三','18545656854'),
         ('213110602','李四','54854549825'),
         ('213110603','王五','45967879896'),
         ('213110701','杨柳','59874564544')");
$r=$db->exec(statement: "insert into students(xh,name,tel,isAmin) values('admin','管理员'，’44444444444)");
echo "插入记录：{$r}条\n";